#ifndef LIST_H
#define LIST_H

#include "thread.h"

struct queue_thread {
	thread_t first;
	thread_t last;
};

/* return a new empty queue */
struct queue_thread* new_queue_thread ();

/* return the first thread of the queue WITHOUT removing it from the queue */
thread_t get_first_thread (const struct queue_thread *q);

/* return the first thread of the queue AND remove it from the queue */
thread_t extract_first_thread (struct queue_thread *q);

/* add the thread to the list depending on his priority */
void add_thread (struct queue_thread *q, thread_t t);

/* print the thread's id for each queue element */
void print_queue (struct queue_thread *qt);

#endif
